<template>
<div>
<!--  上部分-->
  <el-card>
    <el-row>基本信息</el-row>
    <el-form :model="forms">
      <el-row type="flex">
        <el-col :span="6">
          <el-form-item label="运输任务编号:" label-width="100px">
            <el-input v-model="forms.transportTaskId"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="车牌号码:" label-width="100px">
            <el-input v-model="forms.licensePlate"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="起始地机构:" label-width="100px">
            <el-input v-model="forms.startAgencyName"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="目的地机构:" label-width="100px">
            <el-input v-model="forms.endAgencyName"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row type="flex">
        <el-col :span="6">
          <el-form-item label="出车时间:" label-width="100px">
            <el-input v-model="forms.outStorageTime"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="回车时间:" label-width="100px">
            <el-input v-model="forms.intoStorageTime"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="司机:" label-width="100px">
            <el-input v-model="forms.driverName"/>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </el-card>

  <el-card>
    <el-row>异常信息</el-row>
    <el-form :model="form">
      <el-row type="flex">
        <el-col :span="8">
          <el-form-item label="车辆故障:" label-width="100px">
            <el-input v-model="form.as"/>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="车辆违规:" label-width="100px">
            <el-input v-model="form.as"/>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="车辆事故:" label-width="100px">
            <el-input v-model="form.as"/>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </el-card>
</div>
</template>
<script>
import { detailApi } from '@/api/carregister'

export default {
  name: 'carregisterinfo',
  data () {
    return {
      forms: {
        // transportTaskId: ''
        // licensePlate: '',
        // startAgencyName: '',
        // endAgencyName
      },
      form: {
        as: '否'
      }
    }
  },
  created () {
    this.detail()
  },
  methods: {
    async detail () {
      console.log(this.$route.query.id)
      const res = await detailApi(this.$route.query.id)
      console.log(res)
      this.forms = res.data
    }
  }
}

</script>
